<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:ui="http://java.sun.com/jsf/facelets">




<ui:composition template="/Template.xhtml">
	<ui:define name="page">
		<h1>Creation d'un nouveau compte</h1>

		<h:form>
			<table>

				<tr height="20">
					<td colspan="3"><font color="#ff0000">* Champs requis</font></td>
				</tr>

				<tr>
					<td align="right">Pseudo<font color="#ff0000">*</font></td>
					<td width="15"></td>
					<td><h:inputText value="#{Utilisateur.pseudo}" required="true"
							id="pseudo" /> <h:message for="pseudo" /></td>
				</tr>

				<tr>
					<td align="right">Mot de passe<font color="#ff0000">*</font></td>
					<td width="15"></td>
					<td><h:inputSecret value="#{Utilisateur.mdp}" required="true"
							id="mdp" /> <h:message for="mdp" /></td>
				</tr>
				<tr>
					<td align="right">Verification Mot de passe<font
						color="#ff0000">*</font></td>
					<td width="15"></td>
					<td><h:inputSecret value="#{Utilisateur.mdpverif}"
							required="true" id="mdpverif" /> <h:message for="mdpverif" /></td>
				</tr>
				<tr height="20">
					<td colspan="3"></td>
				</tr>
				<tr>
					<td align="right">Vous etes...<font color="#ff0000">*</font></td>
					<td width="15"></td>
					<td><h:selectOneMenu id="type" value="#{Utilisateur.type}"
							required="true">
							<f:selectItem id="chercheur" itemLabel="Demandeur" itemValue="1" />
							<f:selectItem id="proprietaire" itemLabel="Proprietaire"
								itemValue="2" />
						</h:selectOneMenu></td>
				</tr>

				<tr>
					<td align="right">Nom<font color="#ff0000">*</font></td>
					<td width="15"></td>
					<td><h:inputText value="#{Utilisateur.nom}" required="true"
							id="nom" /> <h:message for="nom" /></td>
				</tr>

				<tr>
					<td align="right">Prenom<font color="#ff0000">*</font></td>
					<td width="15"></td>
					<td><h:inputText value="#{Utilisateur.prenom}" required="true"
							id="prenom" /> <h:message for="prenom" /></td>
				</tr>
				<tr>
					<td align="right">Code postal<font color="#ff0000">*</font>
									<div style="color:#aeaeac; min-width:60px; " >
										(Ex: 38920)
									</div>
					</td>
					<td width="15"></td>
					<td><h:inputText value="#{Utilisateur.departement}"
							required="true" id="departement" /> <h:message for="departement" /></td>
				</tr>
				<tr>
					<td align="right">ville<font color="#ff0000">*</font>
									<div style="color:#aeaeac; min-width:60px; " >
										(Ex: Crolles)
									</div>
					</td>
					<td width="15"></td>
					<td><h:inputText value="#{Utilisateur.ville}" required="true"
							id="ville" /> <h:message for="ville" /></td>
				</tr>
				<tr>
					<td align="right">date de naissance
									<div style="color:#aeaeac; min-width:60px; " >
										(Ex: 05/12/1986)
									</div>
					</td>
					<td width="15"></td>
					<td><h:inputText value="#{Utilisateur.dateNaissance}" id="dateNaissance">
							<f:convertDateTime pattern="dd/MM/yyyy" />
						</h:inputText> <h:message for="dateNaissance" /></td>
				</tr>
				<tr>
					<td align="right">Telephone
									<div style="color:#aeaeac; min-width:60px; " >
										(Ex: 0476921355)
									</div>
					</td>
					<td width="15"></td>
					<td><h:inputText value="#{Utilisateur.numtel}" id="numtel" />
						<h:message for="numtel" /></td>
				</tr>
				<tr>
					<td align="right">Email<font color="#ff0000">*</font>
									<div style="color:#aeaeac; min-width:60px; " >
										(Ex: julie.dupont@gmail.com)
									</div>
					</td>
					<td width="15"></td>
					<td><h:inputText value="#{Utilisateur.mail}" required="true"
							id="mail" /> <h:message for="mail" /></td>
				</tr>
				<tr>
				  <td align="right" colspan="3"><h:commandButton
	value="Creer le compte" action="#{Utilisateur.creer}" /></td>
				</tr>



			</table>
		</h:form>
	</ui:define>
</ui:composition>
</html>
